<!-- https://blog.csdn.net/All_lost/article/details/141904770 -->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
</head>

<body>
  <div id="app">
    <textarea name="" v-model="project"></textarea>
  </div>
</body>
<script src="./vuejs/vue.js"></script>
<script>
  const app = new Vue({
    el: "#app",
    data: {
      project: "语文",
    },
    watch: {
      //该方法会在数据变化，触发执行
      //newValue新值，oldValue老值(一般不用)
      project (newValue, oldValue) {
        console.log("新值", newValue, "老值：", oldValue);
      },
    },
  });
</script>